Feat/responsive work table details - #45
Conversation
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f631049b00
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const { localShift, update, toggleDuty, saved, setSaved } = useShift({ | ||
| shift, | ||
| }); |
There was a problem hiding this comment.
Persist shift drafts across responsive layout swaps
When the viewport crosses the sm breakpoint while a shift is being edited—for example, when rotating a phone—WorkTable replaces ShiftRow with ShiftCard, unmounting this useShift instance. The shared provider retains only the last saved ShiftEntry, while localShift (including unsaved time and duty edits) and saved remain component-local, so the new layout discards the draft and reopens previously saved shifts in edit mode. Store the editor draft and saved state in the shared day state, or avoid unmounting the active editor during layout changes.
Useful? React with 👍 / 👎.
No description provided.